#ifndef ANALYZER_WORKERIMAGE_H
#define ANALYZER_WORKERIMAGE_H

#include "Worker.h"
#include "Algorithm.h"

namespace AVSAnalyzer {
    class WorkerImage : public Worker
    {
    public:
        explicit WorkerImage(Scheduler* scheduler, Control* control);
        ~WorkerImage();

        bool startImageProcess(const char* imageData, int imageSize, std::string& msg);
        
        // 添加获取检测结果的方法
        std::vector<DetectObject> getDetectResults() const { return mDetectResults; }

    private:
        void imageProcessThread();
        static void imageProcessThreadWrapper(void* arg);

        char* mImageData;
        int mImageSize;
        std::thread* mImageProcessThread;
        
        // 添加存储检测结果的成员变量
        std::vector<DetectObject> mDetectResults;
    };
}

#endif // ANALYZER_WORKERIMAGE_H